unit CardCost;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfrmCardCost = class(TForm)
    lblCardcost: TLabel;
    edtCardCost: TEdit;
    btnconfirm: TButton;
    btnExit: TButton;
    procedure edtCardCostKeyPress(Sender: TObject; var Key: Char);
    procedure btnconfirmClick(Sender: TObject);
  private
    FCardCost:Currency;
    { Private declarations }
  public
    procedure imiparam(Cardcost:Currency);
    property OutCardCost:Currency read FCardCost;
    { Public declarations }
  end;

var
  frmCardCost: TfrmCardCost;

implementation

{$R *.dfm}

procedure TfrmCardCost.btnconfirmClick(Sender: TObject);
begin
  FCardCost:=StrToCurr(edtCardCost.Text);
end;

procedure TfrmCardCost.edtCardCostKeyPress(Sender: TObject; var Key: Char);
begin
  if not (key in ['0'..'9',#13,#9,#8]) then
    key:=#0;
end;

procedure TfrmCardCost.imiparam(Cardcost: Currency);
begin
  FCardCost:=Cardcost;
  edtCardCost.Text:=CurrToStr(FCardCost);
end;

end.
